import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import First from '@/components/first'
import App from '../App.vue'
import HomeContainer from '../components/tabbar/HomeContainer'
import MemberContainer from '../components/tabbar/MemberContainer'
import ShopcarContainer from '../components/tabbar/ShopcarContainer'
import SearchContainer from '../components/tabbar/SearchContainer'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path:'/',
      redirect:'/home',//这里的重定向不是node里的重定向，只是改变了刚进来的时候的hash值及路径
    },
    {
      path: '/home',
      name: 'home',
      component:HomeContainer
    },
    {
      path: '/member',
      name: 'member',
      component:MemberContainer
    },
    {
      path: '/shopping',
      name: 'shopping',
      component:ShopcarContainer
    },
    {
      path: '/search',
      name: 'search',
      component:SearchContainer
    }
  ]
})
